﻿@model MezmurStore2.Models.Album

@{
    ViewBag.Title = "Details";
}

<h2>Album Details</h2>

<fieldset>
    <legend>Album</legend>

    <div class="display-label">Title</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">Gener</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Gener)
    </div>

    <div class="display-label">Artist</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Artist.Name)
    </div>

    <div class="display-label">ReleaseDate</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ReleaseDate)
    </div>
</fieldset>

<fieldset>
    <legend>Tracks</legend>

    <p>
        @Html.ActionLink("Create New", "Create")
    </p>
    <table>
        <tr>
            <th>
                Title
            </th>
            <th>
                File Size
            </th>
            <th>
                File Path
            </th>
            <th>
            </th>
        </tr>
    @foreach (var item in Model.Tracks)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Name)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FileSize)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FilePath)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                @Html.ActionLink("Details", "Details", new { id = item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.Id })
            </td>
        </tr>
    }
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
